<?php
if(preg_match('/\d/',$_GET["is_can"]) & preg_match('/[a-z0-9]{32,32}/',$_GET["usertoken"]) )
{
    include "islogin.php";
    if($is_log=="1")
    {
        setcookie("nickname", $nickname, time() - 180000, "/");
        setcookie("check", $checkcode, time() - 180000, "/");
        echo "1";
    }
    else
    {
        include 'setting.php';
		$con = mysqli_connect($sqldatabase, $sqlusername, $sqlpassword,$sqltable);
		mysqli_query($con,'set names utf8'); 
        $is_can = "";
        if($_GET["is_can"]=="0")
        {
            $is_can="1";
        }
        else
        {
            $is_can="0";
        }
        mysqli_query($con,"UPDATE softlic SET is_can = '".$is_can."' WHERE usertoken = '".$_GET["usertoken"]."'");
        echo "0";
        mysqli_close($con);
    }
}
?>